<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>

    /* 
    function Function (){}
    function Object (){}
    */

    function Fn() {}
    const fn = new Fn()
    const fn2 = new Fn()
    const o1 = new Object()
    const o2 = {} 

    console.log(Object instanceof Object)
    console.log(Object instanceof Function)

    console.log(Function instanceof Object)
    console.log(Function instanceof Function)

    console.log(Fn instanceof Object)
    console.log(Fn instanceof Function)

    console.log(fn instanceof Object)
    console.log(fn instanceof Function) // false

    /* 
    只要是对象就instanceof Object
    只要是函数就instanceof Function

    A instanceof B
      B是构造函数, A实例对象     A = new B()
      如果B的prototype指向的对象如果是A的原型链上的某个对象, 结果就是true, 否则就是false
    */

    console.log(Function.prototype.__proto__ === Object.prototype) // true
    console.log(Function.prototype)
    /* 
    产生这个结果的原因: 强加上去
      Function.prototype.__proto__ = Object.prototype
    为什么要加?
    */
  </script>
</body>
</html>